<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>美丝牛后端管理平台</title>
    <link rel="stylesheet" th:href="@{/css/font.css}">
    <link rel="stylesheet" th:href="@{/css/xadmin.css}">
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <!--<script type="text/javascript" th:src="@{/js/xadmin.js}"></script>-->

   <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
   <link rel="stylesheet" th:href="@{/layui_ext/dtree/dtree.css}">
   <link rel="stylesheet" th:href="@{/layui_ext/dtree/font/dtreefont.css}">

   <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
   <script type="text/javascript" th:src="@{/layui_ext/dtree/dtree.js}"></script>
   <script type="text/javascript">
       layui.extend({
           dtree: '/layui_ext/dtree/dtree'
       }).use(['element','layer', 'table', 'code' ,'util', 'dtree', 'form'], function(){
           var element = layui.element, layer = layui.layer, table = layui.table, util = layui.util, dtree = layui.dtree, form = layui.form, $ = layui.$;
           var DTree = dtree.render({
               elem: "#demoTree",
               //data: data
               url: "/menu/menujson",
               method:'get'
           });

           dtree.on("node(demoTree)", function(obj){
               layer.msg(JSON.stringify(obj.param));
           })
       });
   </script>


</head>
<body>
    <div class="container">
        <div class="layui-row layui-col-space10">
            <div class="layui-fluid">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>在线示例</legend>
                    <div class="layui-field-box">
                        <div class="layui-row layui-col-space10" style="margin-top: 10px;">
                            <div class="layui-col-xs12">
                                <div id="toolbarDiv" style="overflow: auto">
                                    <ul id="demoTree" class="dtree" data-id="0"></ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
</body>
</html>